package com.example.erat.repository;

import com.example.erat.entity.ClassEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * 班级数据访问层
 */
@Repository
public interface ClassRepository extends JpaRepository<ClassEntity, Long> {
    
    /**
     * 根据班级名称查询班级
     */
    ClassEntity findByName(String name);
    
    /**
     * 判断班级名称是否存在
     */
    boolean existsByName(String name);
} 